import {
    createApp
} from 'vue'
import App from './App.vue'
import store from './store'
import router from './router/index'
import ElementPlus from 'element-plus'
import * as ElIconModules from '@element-plus/icons'
import 'element-plus/dist/index.css'
import '../src/assets/icon/iconfont.css' //图标样式(用阿里矢量图,创建项目后覆盖)
import "../src/assets/css/common.scss" //全局公共样式

import Particles from "particles.vue3"; //粒子特效

const app = createApp(App)
app.use(store)
app.use(router)
app.use(ElementPlus)
app.use(Particles)

const icoArr = []
for (let iconName in ElIconModules) {
    // 循环注册icons
    app.component(iconName, ElIconModules[iconName])
    icoArr.push(ElIconModules[iconName].name)
}
app.config.globalProperties.$icoArr = icoArr //全局挂载ico,因为有使用到图标选择器
app.mount('#app')